<template>
 <el-drawer v-model="dialogVisible" :size="'80%'" :with-header="false">
  <ContactDetail ref="contactDetailRef"/>
 </el-drawer>
</template>
<script lang="ts" setup>
import ContactDetail from './index.vue'
defineOptions({ name: 'DrawerDetail' })
const dialogVisible = ref(false) // 弹窗的是否展示
const contactDetailRef=ref()
/** 打开弹窗 */
const open = async (id?: number) => {
  dialogVisible.value = true
  nextTick(()=>{
contactDetailRef.value.initData(id)
  })
  
}
defineExpose({ open }) // 提供 open 方法，用于打开弹窗
</script>
